package com.kc.gb.feign.ptl;

import com.kc.gb.base.dto.Result;
import com.kc.gb.feign.ptl.support.dtos.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.net.URI;
import java.util.List;

@FeignClient(value = "phoenix-device-ptl",url = "EMPTY")
public interface PtlFeignClient {

    @PostMapping("/device/ptl/commands")
    <T extends AbstractPtlCommand> Result<?> commands(URI uri, @RequestBody List<T> commands);

    @PostMapping("/device/ptl/light")
    Result<?> light(URI uri, @RequestBody LightCommand body);

    @PostMapping("/device/ptl/led")
    Result<?>  led(URI uri, @RequestBody LedCommand body);

    @PostMapping("/device/ptl/button")
    Result<?>  button(URI uri, @RequestBody ButtonCommand body);

    @PostMapping("/device/ptl/beep")
    Result<?>  beep(URI uri, @RequestBody BeepCommand body);

}
